-- GENERATED SPELL FOR [Saltscale Forager] --


function spell0_877(pUnit, Event) --@Poison,n/a--
pUnit:FullCastSpellOnTarget(744,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_877', 30000, 1)
end

function spell1_877(pUnit, Event) --@Rend,n/a--
pUnit:FullCastSpellOnTarget(13443,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_877', 15000, 1)
end

function Sorts_877(pUnit, Event)
local choix_sorts_877 = math.random(0, 1)
if choix_sorts_877 == 0 then
pUnit:RegisterEvent('spell0_877', 1, 1)
end
if choix_sorts_877 == 1 then
pUnit:RegisterEvent('spell1_877', 1, 1)
end
end

function mob877_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_877', math.random(1500, 3000), 1)
end

function mob877_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob877_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob877_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(877, 1, 'mob877_Action')
RegisterUnitEvent(877, 2, 'mob877_Leave')
RegisterUnitEvent(877, 3, 'mob877_Kill')
RegisterUnitEvent(877, 4, 'mob877_Die')
